'use strict';
module.exports = {
	/**
	 * 查询单条
	 * @url admin/system_config/sys/getDetails 前端调用的url参数地址
	 * data 请求参数 说明
	 * @param {String} type  类型
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------
		let { type } = data;

		let whereJson = {};
		
		if(!vk.pubfn.isNull(type)) {
			whereJson["type"] = type;
		}
		
		let dbName = "db-config";

		res["data"] = await vk.baseDao.findByWhereJson({
			dbName,
			whereJson
		});
		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
